package com.janyee.buddha.view

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.TextView

import com.janyee.buddha.R

/**
 * Created by kmlixh on 18/1/1.
 */

class BookContent(private val context: Context) {
    var viewHolder: LinearLayout
    var bookViewer: BookViewer
    var bookhead: TextView

    init {
        viewHolder = LayoutInflater.from(context).inflate(R.layout.book_content, null) as LinearLayout
        bookViewer = viewHolder.findViewById(R.id.bookview)
        val lp = LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
        viewHolder.layoutParams = lp
        bookhead = viewHolder.findViewById(R.id.bookhead)
    }

    fun setHeadText(text: String) {
        bookhead.text = text
    }

}
